package cn.le.util;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class InputUtil {

    private static final BufferedReader KEYBOARD_INPUT =
            new BufferedReader(new InputStreamReader(System.in));

    /**
     *实现键盘数的输入操作
     * @param prmpot
     * @return
     * @throws IOException
     */
    public static String getString(String prmpot) throws IOException {
        boolean flag = true;
        String str = null;
        while (flag){
            System.out.println(prmpot);
            str = KEYBOARD_INPUT.readLine();//读取一行
            if (str == null || "".equals(str)){
                System.out.println("数据出入错误:");
            }else {
                flag = false;
            }
        }
        return str;
    }



}
